package com.ruoyi.common.security.exception;

import com.ruoyi.common.core.constant.Constants;
import com.ruoyi.common.core.exception.BaseException;
import com.ruoyi.common.core.exception.domain.ExceptionMessage;
import com.ruoyi.common.security.constant.RuoyiSecurityConstants;

public class RuoyiSecurityException extends BaseException {
    public static ExceptionMessage RUOYI_SECURITY_USER_DELETED = new ExceptionMessage(RuoyiSecurityConstants.moduleName, "ruoyi_security_user_deleted", "账户已删除");
    public static ExceptionMessage RUOYI_SECURITY_USER_NOT_FOUND = new ExceptionMessage(RuoyiSecurityConstants.moduleName, "ruoyi_security_user_not_found", "用户未找到");
    public static ExceptionMessage RUOYI_SECURITY_USER_STOP_USING = new ExceptionMessage(RuoyiSecurityConstants.moduleName, "ruoyi_security_user_stop_using", "账户已停用");
    public static ExceptionMessage RUOYI_SECURITY_USER_NOT_ACTIVE = new ExceptionMessage(RuoyiSecurityConstants.moduleName, "ruoyi_security_user_not_active", "账户未激活");
    public static ExceptionMessage INVALID_TOKEN = new ExceptionMessage(Constants.MODULE_NAME, "invalid_token", "失效令牌").setStatus(401);

    public RuoyiSecurityException(String code, String defaultMessage) {
        super(RuoyiSecurityConstants.moduleName, code, null, defaultMessage);
    }

    public RuoyiSecurityException(ExceptionMessage exceptionMessage) {
        super(exceptionMessage);
    }
}
